############################################################################
# vendor/Makefile
#
# Copyright (C) 2020 Xiaomi Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################

include $(APPDIR)/Make.defs

# Add CSRCS here
# algorithm  file part .empty file

# application file

#app
CSRCS += usbaud.c
CSRCS += usbcdc.c
CSRCS += usbkb.c
CSRCS += usbmouse.c
#keyboards
CSRCS += keyboard.c
#print
CSRCS += putchar.c
CSRCS += u_printf.c
#usbstd
# CSRCS += usb.c
# CSRCS += usbdesc.c
# CHIP_CSRCS += ./application/usbhw.c

# common file part
CSRCS  += common/utility.c
CSRCS  += common/string.c

# drivers  8278 file
CSRCS += adc.c
CSRCS += aes.c
CSRCS += analog.c
CSRCS += audio.c
CSRCS += bsp.c
CSRCS += clock.c
CSRCS += emi.c
CSRCS += flash.c
CSRCS += gpio_8278.c
CSRCS += i2c.c
CSRCS += lpc.c
CSRCS += pm_2.c
CSRCS += qdec.c
CSRCS += s7816.c
CSRCS += spi.c
CSRCS += timer.c
CSRCS += uart.c
CSRCS += watchdog.c

#add driver ext
CSRCS += ext_hci_uart.c
CSRCS += ext_misc.c
CSRCS += ext_pm.c
CSRCS += ext_rf.c

#add flash file part .

CSRCS += flash_mid1160c8.c
CSRCS += flash_mid1360c8.c
CSRCS += flash_mid1460c8.c
CSRCS += flash_mid11325e.c
CSRCS += flash_mid13325e.c
CSRCS += flash_mid14325e.c

CSRCS += sdk_test.c

#stack file empty

# vendor/common
#common
CSRCS += blt_common.c
CSRCS += blt_fw_sign.c
CSRCS += blt_led.c
CSRCS += blt_soft_timer.c
CSRCS += common_dbg.c
CSRCS += custom_pair.c
CSRCS += device_manage.c
CSRCS += flash_fw_check.c
CSRCS += simple_sdp.c
CSRCS += tl_audio.c
#hci_transport
CSRCS += hci_dfu.c
CSRCS += hci_dfu_port.c
CSRCS += hci_h5.c
CSRCS += hci_slip.c
CSRCS += hci_tr.c
CSRCS += hci_tr_h4.c
CSRCS += hci_tr_h5.c

#b85m_controller
CSRCS += app.c
CSRCS += app_buffer.c
CSRCS += main.c

#application
VPATH += application/app
VPATH += application/keyboard
VPATH += application/print
VPATH += application/usbstd

#common
VPATH += common

#drivers
VPATH += drivers/8278
VPATH += drivers/8278/driver_ext
VPATH += drivers/8278/flash

#stack

#vendor
VPATH += vendor/b85m_controller
VPATH += vendor/common
VPATH += vendor/common/hci_transport

CFLAGS += -fcommon
CFLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-undef
CFLAGS += -D__PROJECT_8278_CONTROLLER__=1 -DCHIP_TYPE=CHIP_TYPE_827x -fshort-wchar
CFLAGS += -I$(TOPDIR)/../vendor/telink/
CFLAGS += -I$(TOPDIR)/../vendor/telink/vendor/common
CFLAGS += -I$(TOPDIR)/../vendor/telink/drivers/8278

include $(APPDIR)/Application.mk
